package src.cs2340.todoApp;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class ToDoListDatabase extends SQLiteOpenHelper {
	public enum Meridian {
		AM,PM;
	}
	
	static final String dbName = "ToDoListDatabase";
	static final String accTable = "Account";
	static final String accName = "Name";
	static final String accEmail = "Email";
	static final String accUsername = "Username";
	static final String accPassword = "Password";
	static final String accTaskList = "TaskList";
	static final String accLocList = "Location List";
	static final String accCatList = "Category List";
	
//	static ArrayList<TaskItem> accTaskList = "TaskList";
//	static ArrayList<Location> accLocList = "Location List";
//	static ArrayList<String> accCatList = "Category List";
	
	static final String taskTable = "Task";
	static final String taskeName = "Name";
	static final String taskLoc = "Location";
	static final String taskDate = "Date";
	static final String taskDescrip = "Description";
	static final String taskCategory = "Category";
	static final String taskChecked = "Checked";
	
	static final String locTable = "Account";
	static final String locTag = "Tag";
	static final String locNum = "Number";
	static final String locStreet = "Street";
	static final String locCity = "City";
	static final String locState = "State";
	static final String locZip = "Zipcode";
	
	static final String dateTable = "Account";
	static final String dateDay = "Day";
	static final String dateMonth = "Month";
	static final String dateYear = "Year";
	static final String dateHour = "Hour";
	static final String dateMin = "Minute";
	static Meridian dateAP; 

	public ToDoListDatabase(Context context) {
		this(context, 1);
	}
	
	public ToDoListDatabase(Context context, int version) {
        super(context, dbName, null, version);
    }
	
	@Override
	public void onCreate(SQLiteDatabase db) {
		db.execSQL("CREATE_TABLE" + dateTable + " (" + dateDay +
				" INTEGER PRIMARY KEY/" + dateMonth + "INTEGER PRIMARY KEY/"
				+ dateYear + "INTEGER PRIMARY KEY" + dateHour +
				" INTEGER PRIMARY KEY:" + dateMin + "INTEGER PRIMARY KEY" +
				dateAP + "MERIDIAN)");
		
		db.execSQL("CREATE_TABLE" + locTable + " (" + locTag +
				" TEXT" + locNum + " INTEGER PRIMARY KEY"
				+ locStreet + " TEXT" + locCity + " TEXT"
				+ locState + " TEXT" +
				locZip + " TEXT)");
		
		
	}

	@Override
	public void onUpgrade(SQLiteDatabase arg0, int arg1, int arg2) {
		// TODO Auto-generated method stub

	}
}
